{extend name="layout" /}
{block name="content"}
<div class="row">
  <div class="col-xs-3">
    <form>
    <div class="input-group input-group-sm">
        <input type="text" class="form-control input-sm" name="keywords">
        <span class="input-group-btn">
          <button type="button" class="btn btn-info btn-flat searchBtn" pageid="pages">搜  索</button>
        </span>
    </div>
    <input type="hidden" name="fieldset" value="keywords-name|title-like">
    </form>
  </div>
  <div class="col-xs-9" style="text-align: right">
    <button type="button" class="btn btn-success btn-sm cocoModal" isForm url="{:url('add')}" title="新增项目" fixat="1"><i class="fa fa-plus"></i> 新增</button>
    <!-- <button type="button" class="btn btn-default btn-sm cocoAjax" confirm="确定要更新缓存吗？" ajaxUrl="{:url('data_cache',array('model'=>$model))}"><i class="fa fa-retweet"></i> 更新缓存</button> -->
    <button type="button" class="btn btn-danger btn-sm cocoAjax" confirm="确定要删除吗？" checkItem="1:0" ajaxUrl="{:url('data_delete',array('model'=>$model))}"><i class="fa fa-remove"></i> 批量删除</button>
  </div>
</div>
  
<table class="layui-table" lay-data="{height: 'full-75', cellMinWidth: 80, page: true, limit:30, url:'{:url('data_show')}'}" lay-filter="lists">
  <thead>
    <tr class="layui-colla-content">
      <th lay-data="{type:'checkbox'}">ID</th>
      <th lay-data="{field:'id', sort: true}">ID</th>
      <th lay-data="{field:'role'}">角色名称</th>
      <th lay-data="{field:'prole'}">上级</th>
      <th lay-data="{field:'statusname'}">状态</th>
      <th lay-data="{fixed: 'right', width:200, align:'center', toolbar: '#barDemo'}">操作</th>
  </thead>
</table>
<script type="text/html" id="barDemo">
  <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
  <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
{/block}
{block name="script"}
{/block}